package com.elite.annotation.config;

import com.elite.annotation.TestEnableImport1;
import com.elite.annotation.TestEnableImport2;
import com.elite.annotation.entity.MyBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.context.annotation.PropertySource;

/**
 * @EnableAspectJAutoProxy 这个注解就是为容器导入一个后置处理器 AnnotationAwareAspectJAutoProxyCreator
 */
@Configuration
@TestEnableImport1
@TestEnableImport2
@PropertySource(value = "test.properties")
public class AopConfig {
	@Bean(name = "myBean11")
	public MyBean myBean1() {
		return new MyBean();
	}

	@Bean
	public MyBean myBean2() {
		return new MyBean();
	}
}
